package com.zq.api.util;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

/**
 * feign拦截器, 在feign请求发出之前，加入一些操作 
 */
@Component
public class FeignInterceptorAddHelper implements RequestInterceptor {
    // 为 Feign 的 RCP调用 添加请求头
    @Override
    public void apply(RequestTemplate requestTemplate) {
        requestTemplate.header("sa-gateway", "zhangqiao");
        
    }
}